package com.whut.service.impl;

import com.whut.entity.UserList;
import com.whut.mapper.UserListMapper;
import com.whut.service.IUserListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserListService implements IUserListService {
    @Autowired
    private UserListMapper userListMapper;

    @Override
    public List<UserList> getAllUserList() {
        return userListMapper.getAllUserList();
    }

    @Override
    public UserList getUserListById(int id) {
        return userListMapper.getUserListById(id);
    }

    @Override
    public List<UserList> getUserListByUsername(String username) {
        return userListMapper.getUserListByUsername(username);
    }

    @Override
    public void addUserList(UserList userList) {
        userListMapper.addUserList(userList);
    }

    @Override
    public void updateUserList(UserList userList) {
        userListMapper.updateUserList(userList);
    }

    @Override
    public void deleteUserList(int id) {
        userListMapper.deleteUserList(id);
    }
}
